# -*- coding: utf-8 -*-
"""
# @Time    : 2021/1/11 下午4:46
# @Author  : tgy
"""
import hashlib


def test01():
    ...
    md5 = hashlib.md5()
    print(md5)
    md5.update('hello'.encode('utf-8'))
    print(md5.hexdigest())


def test02():
    sha1 = hashlib.sha1()
    sha1.update('tgy'.encode('utf-8'))
    sha1.update(b'123')
    print(sha1.hexdigest())


if __name__ == '__main__':
    ...
    test02()